
function getName() {
    var name = "xb";
    return function () {
        return name;
    }
}

var name1 = getName();
console.log(name1());